package org.ranshiyan.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.ranshiyan.model.User;

import java.util.List;

@Mapper
public interface UserDao extends BaseMapper<User> {

    @Select("select `username` from `user`")
    List<User> zlist();

    @Update("update `user` set djsum=djsum+'100',upddate=NOW() where id='1'")
    boolean updsum();

    @Select("SELECT id from ssh_ssi.`user` where username=#{username} and `password`=#{password}")
    boolean login(User user);

}
